<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>

<style>
    .box {
        width: 100px;
        height: 100px;
        background-color: pink;
    }
</style>

<body>


<div class="box"></div>


<script>
    const element = document.querySelector('.box');
    element.style.width = '200px'
    element.style.backgroundColor = 'yellow'
</script>
</body>
</html>